package weaver.aiyh_pcn.workflow_to_customer.model;

/**
 * @author EBU7-dev1-ayh
 * @create 2021/8/11 0011 10:29
 * 表字段映射
 */


public class TableFieldRelation {
	private int id;
	private int changeRules;
	private String customerField;
	private String rulesValue;
	private String workflowField;
	private String workflowTable;
	private String customerTable;
	private String outUserField;
	private int customerType;

	public TableFieldRelation(int id, int changeRules, String customerField, String rulesValue, String workflowField, String workflowTable, String customerTable, String outUserField) {
		this.id = id;
		this.changeRules = changeRules;
		this.customerField = customerField;
		this.rulesValue = rulesValue;
		this.workflowField = workflowField;
		this.workflowTable = workflowTable;
		this.customerTable = customerTable;
		this.outUserField = outUserField;
	}

	public TableFieldRelation(Builder builder) {
		this.id = builder.id;
		this.changeRules = builder.changeRules;
		this.customerField = builder.customerField;
		this.rulesValue = builder.rulesValue;
		this.workflowField = builder.workflowField;
		this.workflowTable = builder.workflowTable;
		this.customerTable = builder.customerTable;
		this.outUserField = builder.outUserField;
		this.customerType = builder.customerType;
	}


	public static Builder builder(){
		return new Builder();
	}

	public static class Builder{
		private int id;
		private int changeRules;
		private String customerField;
		private String rulesValue;
		private String workflowField;
		private String workflowTable;
		private String customerTable;
		private String outUserField;
		private int customerType;

		public Builder() {
		}

		public Builder id(int id) {
			this.id = id;
			return this;
		}
		public Builder customerType(int customerType) {
			this.customerType = customerType;
			return this;
		}

		public Builder changeRules(int changeRules) {
			this.changeRules = changeRules;
			return this;
		}

		public Builder customerField(String customerField) {
			this.customerField = customerField;
			return this;
		}

		public Builder rulesValue(String rulesValue) {
			this.rulesValue = rulesValue;
			return this;
		}

		public Builder workflowField(String workflowField) {
			this.workflowField = workflowField;
			return this;
		}

		public Builder workflowTable(String workflowTable) {
			this.workflowTable = workflowTable;
			return this;
		}

		public Builder customerTable(String customerTable) {
			this.customerTable = customerTable;
			return this;
		}

		public Builder outUserField(String outUserField) {
			this.outUserField = outUserField;
			return this;
		}

		public TableFieldRelation build() {
			return new TableFieldRelation(this);
		}
	}

	public int getCustomerType() {
		return customerType;
	}

	public int getId() {
		return id;
	}

	public int getChangeRules() {
		return changeRules;
	}

	public String getCustomerField() {
		return customerField;
	}

	public String getRulesValue() {
		return rulesValue;
	}

	public String getWorkflowField() {
		return workflowField;
	}

	public String getWorkflowTable() {
		return workflowTable;
	}

	public String getCustomerTable() {
		return customerTable;
	}

	public String getOutUserField() {
		return outUserField;
	}

	@Override
	public String toString() {
		return "TableFieldRelation{" +
				"id=" + id +
				", changeRules=" + changeRules +
				", customerField='" + customerField + '\'' +
				", rulesValue='" + rulesValue + '\'' +
				", workflowField='" + workflowField + '\'' +
				", workflowTable='" + workflowTable + '\'' +
				", customerTable='" + customerTable + '\'' +
				", outUserField='" + outUserField + '\'' +
				", customerType=" + customerType +
				'}';
	}
}
